package com.scsj.supermarket.view.activity.messagemodel;

import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;

import com.scsj.supermarket.R;
import com.scsj.supermarket.utils.SkipUtils;
import com.scsj.supermarket.view.activity.baseactivitymodel.BaseActivity;

/**
 * 消息
 */
public class MessageActivity extends BaseActivity implements View.OnClickListener {

    private RelativeLayout mLogisticsMsgRl;
    private RelativeLayout mSystemMsgRl;

    @Override
    protected void createView(Bundle savedInstanceState) {
        setContentView(R.layout.activity_message);
        //  ScreenAdapterTools.getInstance().loadView((ViewGroup)getWindow().getDecorView());
        //ScreenAdapterTools.getInstance().reset(this);//如果希望android7.0分屏也适配的话,加上这句
        initToolbar();
        setToolbarTitle("消息");
        hasBack(true);
        initView();
    }

    @Override
    protected void initView() {

        mLogisticsMsgRl = (RelativeLayout) findViewById(R.id.logistics_msg_rl);
        mLogisticsMsgRl.setOnClickListener(this);
        mSystemMsgRl = (RelativeLayout) findViewById(R.id.system_msg_rl);
        mSystemMsgRl.setOnClickListener(this);
    }

    @Override
    protected void initListener() {

    }

    @Override
    protected void initData() {

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            //物流信息和系统通知可以共用界面
            default:
                break;
            case R.id.logistics_msg_rl://物流消息
                SkipUtils.toMessageList(this);
                break;
            case R.id.system_msg_rl://系统通知
                SkipUtils.toInterFlow(this);
                break;
        }
    }
}
